package com.worthtech.billportal.bean.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the bill_master table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="bill_master"
 */

public abstract class BaseBillMaster  implements Serializable {

	public static String REF = "BillMaster";
	public static String PROP_STATUS = "Status";
	public static String PROP_BILL_NO = "BillNo";
	public static String PROP_PAY_STATUS = "PayStatus";
	public static String PROP_BILL_DETAIL = "billDetail";
	public static String PROP_BILL_TYPE = "BillType";
	public static String PROP_CREATED_BY = "CreatedBy";
	public static String PROP_CREATED_DATE = "CreatedDate";
	public static String PROP_TERMINAL_NO = "TerminalNo";
	public static String PROP_ID = "Id";
	public static String PROP_ORGANIZATION_CODE = "OrganizationCode";


	// constructors
	public BaseBillMaster () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBillMaster (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBillMaster (
		java.lang.Integer id,
		java.lang.String status,
		java.lang.String payStatus,
		java.lang.String billNo,
		java.lang.String terminalNo,
		java.lang.String createdBy,
		java.util.Date createdDate,
		java.lang.String organizationCode) {

		this.setId(id);
		this.setStatus(status);
		this.setPayStatus(payStatus);
		this.setBillNo(billNo);
		this.setTerminalNo(terminalNo);
		this.setCreatedBy(createdBy);
		this.setCreatedDate(createdDate);
		this.setOrganizationCode(organizationCode);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String status;
	private java.lang.String payStatus;
	private java.lang.String billNo;
	private java.lang.String terminalNo;
	private java.lang.String billType;
	private java.lang.String createdBy;
	private java.util.Date createdDate;
	private java.lang.String organizationCode;

	// one to one
	private com.worthtech.billportal.bean.BillDetail billDetail;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.String getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.String status) {
		this.status = status;
	}



	/**
	 * Return the value associated with the column: payStatus
	 */
	public java.lang.String getPayStatus () {
		return payStatus;
	}

	/**
	 * Set the value related to the column: payStatus
	 * @param payStatus the payStatus value
	 */
	public void setPayStatus (java.lang.String payStatus) {
		this.payStatus = payStatus;
	}



	/**
	 * Return the value associated with the column: billNo
	 */
	public java.lang.String getBillNo () {
		return billNo;
	}

	/**
	 * Set the value related to the column: billNo
	 * @param billNo the billNo value
	 */
	public void setBillNo (java.lang.String billNo) {
		this.billNo = billNo;
	}



	/**
	 * Return the value associated with the column: terminalNo
	 */
	public java.lang.String getTerminalNo () {
		return terminalNo;
	}

	/**
	 * Set the value related to the column: terminalNo
	 * @param terminalNo the terminalNo value
	 */
	public void setTerminalNo (java.lang.String terminalNo) {
		this.terminalNo = terminalNo;
	}



	/**
	 * Return the value associated with the column: billType
	 */
	public java.lang.String getBillType () {
		return billType;
	}

	/**
	 * Set the value related to the column: billType
	 * @param billType the billType value
	 */
	public void setBillType (java.lang.String billType) {
		this.billType = billType;
	}



	/**
	 * Return the value associated with the column: createdBy
	 */
	public java.lang.String getCreatedBy () {
		return createdBy;
	}

	/**
	 * Set the value related to the column: createdBy
	 * @param createdBy the createdBy value
	 */
	public void setCreatedBy (java.lang.String createdBy) {
		this.createdBy = createdBy;
	}



	/**
	 * Return the value associated with the column: createdDate
	 */
	public java.util.Date getCreatedDate () {
		return createdDate;
	}

	/**
	 * Set the value related to the column: createdDate
	 * @param createdDate the createdDate value
	 */
	public void setCreatedDate (java.util.Date createdDate) {
		this.createdDate = createdDate;
	}



	/**
	 * Return the value associated with the column: organizationCode
	 */
	public java.lang.String getOrganizationCode () {
		return organizationCode;
	}

	/**
	 * Set the value related to the column: organizationCode
	 * @param organizationCode the organizationCode value
	 */
	public void setOrganizationCode (java.lang.String organizationCode) {
		this.organizationCode = organizationCode;
	}



	/**
	 * Return the value associated with the column: billDetail
	 */
	public com.worthtech.billportal.bean.BillDetail getBillDetail () {
		return billDetail;
	}

	/**
	 * Set the value related to the column: billDetail
	 * @param billDetail the billDetail value
	 */
	public void setBillDetail (com.worthtech.billportal.bean.BillDetail billDetail) {
		this.billDetail = billDetail;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.worthtech.billportal.bean.BillMaster)) return false;
		else {
			com.worthtech.billportal.bean.BillMaster billMaster = (com.worthtech.billportal.bean.BillMaster) obj;
			if (null == this.getId() || null == billMaster.getId()) return false;
			else return (this.getId().equals(billMaster.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}